import requests,os


url = 'https://antispider1.scrape.center/api/movie/?limit=10&offset=0'
movies = requests.get(url).json()
items = movies['results']

if os.path.exists('电影'):
    pass
else:
    os.mkdir('电影')

for item in items:
    item_url = item['cover']
    item_response = requests.get(item_url)
    print(item_response.content)
    with open(f'电影/{item["name"]}.jpg','wb')as f:
        f.write(item_response.content)

    # print(item['name'],item['score'],item['cover'])


